function TextInfo(){
	this.textObj = null;
	this.textObjIndex = 0;
	this.charRect = [];
	this.lineIndex = 0;
	this.textObjRect = [];
	this.charInfo = [];//[{width:111,heigth:11,char:'a'},{width:111,heigth:11,char:'a'}]
}

TextInfo.prototype.setCharRect = function(index,charRect){
	this.charRect[index] = charRect;
}

TextInfo.prototype.getCharRect = function(){
	return charRect;
}

TextInfo.prototype.getTextObj = function(){
	return textObj;
}

TextInfo.prototype.setTextObj = function(textObj){
	this.textObj = textObj;
}

TextInfo.prototype.setTextObjRect = function(textObjRect){
	this.textObjRect = textObjRect;
}

TextInfo.prototype.setCharInfo = function(charInfo,index){
	this.charInfo[index] = charInfo;
}

TextInfo.prototype.SetTextObjIndex = function(index){
	this.textObjIndex = index;
}

TextInfo.prototype.GetTextObjIndex = function(index){
	this.textObjIndex = index;
}

TextInfo.prototype.GetSize = function(){
	return this.charInfo.length;
}

TextInfo.prototype.GetRectByIndex = function(startIndex,endIndex){
	var rectObj = {"left":this.textObjRect[0][0],"top":this.textObjRect[0][1],"height":this.textObjRect[2][1] - this.textObjRect[0][1],"width":0}
	for(var i = 0; i < this.charRect.length; i++){
		if(i >= startIndex && i <= endIndex){
			if(i == startIndex){
				rectObj.left = this.charRect[i][0];
				rectObj.top = this.charRect[i][1];
			}
			rectObj.width += this.charInfo[i].width;
		}
		
		
	}
	return rectObj;
}

var CARET_INFO = function () {
	this.textIndex = 0;
    this.index = -1;
    this.bLeft = true;
}
